![GitHub](https://images.github.media/EloquaImages/clients/GitHubInc/%7B06958555-b158-43f9-9f4c-f7cc10a305a0%7D_github-logo-email.png)
Think you’re fast?
We’ll see about that.
In this edition of The GitHub Insider, we’re throwing down a coding challenge.
See, our research shows that GitHub Copilot can help developers code up to 55% faster. To put that to the test, we’ve created three challenges for you to tackle. Can you outpace GitHub Copilot?
You’ll need to tackle them in two ways:
- Without GitHub Copilot: go old school and code it all from scratch.
- With GitHub Copilot: use AI-powered assistance to speed things along.
Once you’ve finished, share your completion times (submission info below). Top times will be featured in the next newsletter!
Ready to race? Let’s go!
![](https://images.github.media/EloquaImages/clients/GitHubInc/%7B25387fad-173b-4411-b0da-a2e1d23efa0d%7D_gh-insider-jan-2025-2-1.gif)
Challenge #1:
Debugging mayhem – fix the broken code 🔧
It happened again: your codebase has been acting up, and you’ve got a critical issue to fix.
In the following snippet, you’ll need to identify and fix the bugs that prevent the function from working correctly. The logic should handle edge cases (like negative or missing values) and return a properly formatted total.
Here are the rules:
- You can use JavaScript or Python (with similar logic).
- Your time starts once you begin reading the code.
- Your solution should pass at least three test cases (e.g.,
calculateTotal(10, 2)
should return"20.00"
).
Here is the snippet:
![](https://images.github.media/EloquaImages/clients/GitHubInc/%7Beee58bda-780e-49d7-9ada-54a7e5ca9792%7D_gh-insider-jan-2025-2-2alt.jpg)
⭐ Time yourself! Can you fix this in 10 minutes or less? What about with GitHub Copilot?
Challenge #2:
Automate away the boring – build a GitHub Action 🔄
It’s a familiar workplace scene: your team wants to automate testing whenever a new pull request is opened. You need to create a GitHub Action that automatically runs unit tests.
You’ll need to:
-
Write a GitHub Actions YAML file that triggers the test script for a Node.js project. This action should:
- Run on
pull_request
events. - Use Node.js v18.
- Install dependencies and run tests via
npm install && npm test
.
- Run on
Here are the rules:
- Your YAML configuration must be correct and functional.
⭐ Time yourself! Can you get your action running in under 15 minutes? What about with GitHub Copilot?
Challenge #3:
Write a complicated regular expression 🦾
Picture this: you're trying to parse a lot of data to find valid email addresses. The kicker is, you don’t want to find any email addresses that use .edu as the domain (and that includes domains that might be on a subdomain, like department.school.edu
).
Write a regular expression that can find email addresses from chunks of text (within text and on new lines) but that excludes any .edu addresses.
Here are the rules:
- You can use any programming language you want
- Feel free to use this GitHub Gist for sample text
- You can test the regular expression by using a resource like https://regex101.com or VS Code’s built-in regular expression search options
- The regex should be able to account for emails on subdomains, that is, both
user@school.edu
anduser@department.school.edu
⭐ Time yourself! Can you finish in under 10 minutes? What about with GitHub Copilot?
How to submit your times:
- Complete the task with and without GitHub Copilot.
- Take a screenshot of your terminal or IDE with both sets of times visible.
- Email us at Insider@GitHub.com
We can’t wait to see how you and GitHub Copilot fare against the stopwatch!
Get started for free with GitHub Copilot
✨ This newsletter was written by Christina Warren and produced by Gwen Davis. ✨
More to explore 🌎
Join our GitHub Copilot conversations 🤖
Visit our community forum to see what people are saying + offer your own two cents.
Stay updated on GitHub products 📦
Discover the latest ships, launches, and improvements in our Changelog.
Subscribe to our LinkedIn newsletter 🚀
Do your best work on GitHub. Subscribe to our LinkedIn newsletter, Branching Out_.